import skRequest from '../request'

// 获取部门列表
export function postDepartmentListData(data: any) {
  return skRequest.post({
    url: '/department/list',
    data
  })
}

// 根据id删除部门
export function deleteDepartmentById(id: number) {
  return skRequest.delete({
    url: `/department/${id}`
  })
}

// 新建部门
export function createDepartmentData(departmentInfo: any) {
  return skRequest.post({
    url: '/department',
    data: departmentInfo
  })
}

// 编辑部门
export function editDepartmentData(id: number, departmentInfo: any) {
  return skRequest.patch({
    url: `/department/${id}`,
    data: departmentInfo
  })
}
